home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16206 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: cocoa.brown.edu!news
  2. From: Yeuan-Ming_Sheu@brown.edu (Yeuan-Ming Sheu)
  3. Newsgroups: comp.lang.c++,comp.os.linux.setup
  4. Subject: Re: G++ and math.h
  5. Date: 10 Apr 1996 00:00:41 GMT
  6. Organization: Brown University, Providence, RI -- USA
  7. Message-ID: <4ketn9$kvm@cocoa.brown.edu>
  8. References: <316A9304.6E1B@easynet.co.uk>
  9. NNTP-Posting-Host: 128.148.60.129
  10. Mime-Version: 1.0
  11. Content-Type: Text/Plain; charset=ISO-8859-1
  12. X-Newsreader: WinVN 0.99.5
  13.  
  14. In article <316A9304.6E1B@easynet.co.uk>, scarecrow@easynet.co.uk 
  15. says...
  16. >
  17. >Dear All,
  18. >
  19. >        I am having problems compiling code which uses the math.h 
  20. >header. I have included the header correctly, but when I compile using 
  21. >g++ 2.7.0 with -o and -m486 options I get several errors looking like 
  22. >this:
  23. >
  24. >"/tmp/cca001502.o(.text+0x1ce): undefined reference to 'sin'"
  25. >
  26. >        There is one error for every trig equation in the code. At 
  27. >university I have to use a -l m option, but my linux version has never 
  28. >heard of it.
  29. >
  30. >        I also compiled it with borland 3.51 under DOS and it compiled 
  31. >fine, but as the code is a Roff pre-processor I have no idea if it 
  32. works 
  33. >as I need a Linux executable.
  34. >
  35. >        Thanks for your help,
  36. >
  37. >                James Purbrick.
  38.  
  39. Using '-Lm' or '-lm' option will work!
  40.  
  41. Yeuan-Ming Sheu
  42.  
  43.